﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<OneDollarStore.Models.ProductModel>" %>
<%@ Import Namespace="OneDollarStore.Helpers" %>

<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">
	OneDollar - Just the best
</asp:Content>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <!-- Animation -->
    <script type="text/javascript">
        $(document).ready(function () {
            $(".details").click(function () {
                $("#loading").fadeIn('fast');
                $("#dim").fadeIn();
                $("#details").fadeIn();
                return false;
            });
            $("#dim").click(function () {
                $("#loading").hide();
                $("#details").fadeOut('slow');
                $("#details").empty();
                $("#dim").fadeOut();
                return false;
            });
        });
        function hideLoading() {
            $("#loading").hide();
        }
    </script>
    <div class="right">
        <div id="dim"></div>
        <div id="loading"></div>
        <div id="details"></div>
        <b style="padding-left:5px; font-size:13px; color:Red"><%= ViewData["NumberOfItems"].ToString() %> items found.</b>
        <br />
        <br />
        <% Html.RenderPartial("DisplayProducts", Model.Products); %>
        <br style="clear:both"/>
        <strong style="padding-left:5px"><%= Html.Paging(Model.NumberOfPages, Model.CurrentPage, 8, "Search?keywords=" + Model.Message + "&") %></strong>
    </div>
</asp:Content>